<template>
    <svg :style="{ width, height }">
        <use :xlink:href="prefix + name" :fill="color"></use>
    </svg>
</template>

<script setup lang="ts">
defineProps({
    // 前缀
    prefix: {
        type: String,
        default: "#icon-",
    },
    // 图标名字
    name: String,
    // 图标颜色
    color: {
        type: String,
        default: "",
    },
    // 图标大小
    width: {
        type: String,
        default: "16px",
    },
    height: {
        type: String,
        default: "16px",
    },
});
</script>

<style lang="scss" scoped></style>
